<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LoginForm.jsp</title>
<style type="text/css">
#login{
	
}
a{
	text-decoration:none;
	font-size:13px;
	color:#116633;
	font-family:dotum;
	font-weight:bold;
}
a:hover{
	text-decoration:underline;
	text-shadow:2px 2px 2px #bbaaaa;
}
</style>

<script type="text/javascript">
function getId(id){return document.getElementById(id)}
function init(){
	getId('btnLogout').onclick=function(){
		location.href='MyHome.jsp?inc_content=logout.jsp';
	}
}
</script>


</head>
<body>
<%
	String sessionID = (String)session.getAttribute("memberid"); // getAttribute의 반환형은 Object이므로 String으로 캐스팅
%>

<div id='login' align='right'>

<%
	// 로그인 정보가 기억되어 있는 세션정보를 취득

	if(sessionID==null || sessionID == ""){
%>
	<label><a href="MyHome.jsp?inc_content=./member/join.jsp">회원가입</a></label>
	<label><a href="MyHome.jsp?inc_content=Login.jsp">로그인</a></label>
<%} else {%>
<!-- 로그인 후 페이지 -->
[<%=sessionID%>님 반갑습니다]
<input type='button' value='logout' id='btnLogout'>
<label><a href='MyHome.jsp?inc_content=./guest/list.jsp'>방명록</a></label>
<label><a href='MyHome.jsp?inc_left=./member/menu_member.jsp'>회원관리</a></label>
<label><a href='MyHome.jsp?inc_left=./databank/download.jsp'>DOWNLOAD</a></label>
<%} %>
<label><a href="http://192.168.10.106:8888/web1403/MyHome/MyHome.jsp" >HOME</a></label> <!-- target='refresh' -->

<label><a href="#">고객센터</a></label>
<label><a href="#">도움말</a></label>
</div>

<script>init();</script>
</body>
</html>